<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="decorator"
	uri="http://www.opensymphony.com/sitemesh/decorator"%>
<%@taglib prefix="sec"
	uri="http://www.springframework.org/security/tags"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<link rel="stylesheet" href="css/reset-fonts-grids.css" type="text/css" />
<link rel="stylesheet" href="css/yuiapp.css" type="text/css" />
<link id="theme" rel="stylesheet" href="css/aqua.css" type="text/css" />

<link rel="stylesheet" type="text/css"
	href="css/displaytag/displaytag.css" />
<link rel="stylesheet" type="text/css"
	href="css/displaytag/alternative.css" />

<script src="js/yui/build/yui/yui-min.js" type="text/javascript"></script>

<script src="js/yuiapp.js" type="text/javascript"></script>
<decorator:head />
</head>

<body class="rounded" onload="<decorator:getProperty property='body.onload'/>">
	<div id="doc3" class="yui-t0">

		<div id="hd">
			<h1>Nautilus</h1>
			<div id="navigation">
				<ul id="primary-navigation">
					<sec:authorize access="isAnonymous()">
						<li class="active"><a href="<c:url value='/'/>">Login</a>
						</li>
					</sec:authorize>
					<sec:authorize access="hasRole('ROLE_ADMIN')">
						<li class="<c:out value='${tab_users}'/>"><a
							href="<c:url value='/users.htm'/>">Users</a>
						</li>
					</sec:authorize>
					<sec:authorize access="hasRole('ROLE_USER')">
						<li class="<c:out value='${tab_harbours}'/>"><a
							href="<c:url value='/harbours.htm'/>">Harbours</a>
						</li>
					</sec:authorize>
					<sec:authorize access="hasRole('ROLE_USER')">
						<li class="<c:out value='${tab_ships}'/>"><a
							href="<c:url value="/ships.htm"/>">Ships</a>
						</li>
					</sec:authorize>
					<sec:authorize access="hasRole('ROLE_ADMIN')">
						<c:if test="${is_ship_edit_mode}">
							<li class='active'><a href="#">Ship Edit</a>
							</li>
						</c:if>
					</sec:authorize>
					<sec:authorize access="hasRole('ROLE_ADMIN')">
						<c:if test="${is_crew_edit_mode}">
							<li class='active'><a href="#">Crew Edit</a>
							</li>
						</c:if>
					</sec:authorize>
					<sec:authorize access="hasRole('ROLE_USER')">
						<li class="<c:out value='${tab_routes}'/>"><a
							href="<c:url value="/routes.htm"/>">Routes</a>
						</li>
					</sec:authorize>
					<sec:authorize access="hasRole('ROLE_ADMIN')">
						<li class="<c:out value='${tab_employees}'/>"><a
							href="<c:url value="/employees.htm"/>">Employees</a>
						</li>
					</sec:authorize>
					<sec:authorize access="hasRole('ROLE_ADMIN')">
						<c:if test="${is_empl_edit_mode}">
							<li class='active'><a href="#">Employee Edit</a>
							</li>
						</c:if>
					</sec:authorize>
				</ul>

				<ul id="user-navigation">
					<sec:authorize access="isAuthenticated()">
						<li><a href="<c:url value='/j_spring_security_logout'/>">Logout</a>
						</li>
					</sec:authorize>
				</ul>
				<div class="clear"></div>
			</div>
		</div>

		<div id="bd">
			<div id="yui-main">
				<div class="yui-b">
					<div class="yui-g">
						<decorator:body />
					</div>
				</div>
			</div>
		</div>

		<div id="ft">
			<p class="inner">Copyright &copy; 2012 Luiza Udroiu</p>
		</div>

	</div>
</body>
</html>
